//
//  MSChapterManager.m
//  MagicSword
//
//  Created by Netease on 15/11/19.
//  Copyright © 2015年 Jonear. All rights reserved.
//

#import "MSChapterManager.h"
#import "MSChapterDotInfo.h"

@implementation MSChapterManager

+ (NSArray *)getDotDataWithSession:(NSInteger)session passIndex:(NSInteger)passIndex {
    NSArray *dotArray = nil;
    
    if (session == 0) {
        dotArray = @[[MSChapterDotInfo createDotWithPossion:CGPointMake(80, 250) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(100, 180) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(105, 95) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(200, 20) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(320, 60) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(430, 50) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(430, 110) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(240, 100) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(200, 155) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(340, 250) Model:MSChapterDotModel_NoPass],
                     [MSChapterDotInfo createDotWithPossion:CGPointMake(390, 300) Model:MSChapterDotModel_NoPass],
                     ];
    }
    
    int i = 0;
    for (MSChapterDotInfo * info in dotArray) {
        info.possion = CGPointMake(info.possion.x*ScreenGameScale, info.possion.y*ScreenGameScale);
        if (i<passIndex) {
            info.model = MSChapterDotModel_Pass;
        } else if (i == passIndex) {
            info.model = MSChapterDotModel_In;
        }
        i++;
    }
    
    return dotArray;
}

+ (NSArray *)getChapterName {
    return @[@"第一节",@"第二节",@"第三节",@"第四节",@"第五节",@"第六节",@"第七节",@"第八节",@"第九节",@"第十节",@"最终节"];
}

+ (NSString *)getSessionName:(NSInteger)session {
    NSArray *nameArray = @[@"第一章",@"第二章",@"第三章",@"第四章",@"第五章"];
    if (nameArray.count > session) {
        return nameArray[session];
    }
    return @"";
}

+ (NSString *)getPrizeMessageWithSession:(NSInteger)session index:(NSInteger)index {
    NSArray *session1 = @[@"30金币",@"40金币",@"50金币",@"60金币",@"70金币",@"80金币",@"80金币",@"80金币",@"80金币",@"80金币",@"80金币"];
    if (session == 0) {
        return session1[index];
    }
    
    return @"";
}

+ (void)getPrizeWithSession:(NSInteger)session index:(NSInteger)index {
    
}

@end
